//package cn.ac.iscas;
//
//import cn.ac.iscas.domain.NodeTask;
//import cn.ac.iscas.service.task.flink.FlinkSqlTask;
//import com.google.common.collect.Maps;
//import com.google.common.collect.Sets;
//import com.iscas.datasong.lib.common.DataSongException;
//import com.iscas.datasong.lib.util.DataSongJsonUtils;
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//
//import java.util.List;
//import java.util.Map;
//
//@SpringBootApplication
//public class SchedulerApplication {
//    public static void main(String[] args) throws DataSongException {
////        if (args.length == 0) {
////            return;
////        }
////        List<Map<String, Object>> components = DataSongJsonUtils.fromJson(args[0], List.class);
////        for (Map<String, Object> component : components) {
////            System.out.println();
////        }
//
////        NodeTask nodeTaskA = new FlinkSqlTask(3_000, "123", "nodeA", null);
////        NodeTask nodeTaskB = new FlinkSqlTask(4_000, "123", "nodeB", null);
////        NodeTask nodeTaskC = new FlinkSqlTask(2_000, "123", "nodeC", Sets.newHashSet(nodeTaskA.getTaskId()));
////        NodeTask nodeTaskD = new FlinkSqlTask(3_000, "123", "nodeD", Sets.newHashSet(nodeTaskB.getTaskId()));
////        NodeTask nodeTaskE = new FlinkSqlTask(5_000, "123", "nodeE", Sets.newHashSet(nodeTaskC.getTaskId(), nodeTaskD.getTaskId()));
////        NodeTask nodeTaskF = new FlinkSqlTask(3_000, "123", "nodeF", Sets.newHashSet(nodeTaskMap.get("nodeE").getTaskId()));
////        NodeTask nodeTaskG = new FlinkSqlTask(2_000, "123", "nodeG", Sets.newHashSet(nodeTaskMap.get("nodeE").getTaskId()));
////
////
////        Map<String, NodeTask> nodeTaskMap = Maps.newConcurrentMap();
////        nodeTaskMap.put(nodeTaskA.getTaskId(), nodeTaskA);
////        nodeTaskMap.put(nodeTaskB.getTaskId(), nodeTaskB);
////        nodeTaskMap.put(nodeTaskC.getTaskId(), nodeTaskC);
////        nodeTaskMap.put(nodeTaskD.getTaskId(), nodeTaskD);
////        nodeTaskMap.put(nodeTaskE.getTaskId(), nodeTaskE);
////
////
////        nodeTaskMap.put(nodeTaskF.getTaskId(), nodeTaskF);
////        nodeTaskMap.put(nodeTaskG.getTaskId(), nodeTaskG);
//
//
//
//        //System.out.println(args[0]);
//        SpringApplication.run(SchedulerApplication.class, args);
//    }
//}
